Davar4: MDK - Preparation of lexicon modules Homepage Help index Previous Next

 
 

Preparation of lexicon modules


Lexicon modules are modules, which use word text as key (Latin, Hebrew, Greek) or Strong# as key word or gematrical value as key word.

In descriptive part, lexicone can have up to 10 headings, where can be used various tags (e.g. Hebrew or Greek texts, Strong#, references, PDF references etc...)

Below headings, there is description text area, where tags can be used.

Lexicon modules are SQLite3 database files. You can also open .lex file in database browser to edit.

 

 

IMPORTANT:

It is recomended to use first heading area with lexicon key (e.g. with Word label, as on pictures below)

 

 

Convertor program d4lex.exe needs again two files: data.txt and info.txt.

File info.txt contains definition of lexicon structure (number and type of the headers etc.) and this define structure must be followed in data.txt.

Most items in info.txt was explained in preparation of book section, please look there too.

 


Example6 - Thompson Chain Topics as LEX

This is an example, which you will find in MDK folder. After compilation of module, you can move prepared lex file to data folder, start Davar4 and open this module.

Now we will pass through info.txt and data.txt files and comment most important parts.

Example of TCT lexicon: Latin based text as key and 1 heading without tags(AARON), below is description text area with reference tags

 

info.txt file

 

Example of info.txt file used in Example6 - Thompson Chain Topics as LEX (blue, bold) , next line (red) is commentary and explanation (not a part of file!). All red commentaries also starts here by ; character - thus you can copy and paste to editor all section below and use it as template for your module.

;THIS FILE MUST BE UTF-8, Little Endian, without Byte Order Mark. New line is CR+LF pair

; when ; is used as first character, all line is ignored (user note)

D4_Version_Major=1
D4_Version_Minor=0

; major and minor version. Important when you release fixed module versions

D4_OutputFile=tct.lex

; name of the final output module file, tct.lex


D4_Abbreviation=TCT
; each module has abbreviation, be sure you use UNIQUE text. Max. 15 characters.

D4_Title=Thompson Chain Topics
; short name of the module. Max 31 characters.

D4_Info=Topical references are from R. A. Torrey's New Topical Textbook
; Description of the module. When need to insert paragraph, use |C tag. Max. 8191 characters.

D4_Copyright=Frank Thompson's 1934 "The New Chain-Reference Bible". Copyright May 24 1934, US. registration number A72501; not renewed; became public domain material in 1962. Spellings Anglicisied. Errors in cross-references corrected. Material keyed and proofed by Paul Houghton. This material contains information that is a proper subset of the material distributed by B.B. Kirkbride under the trademark of "Thompson Chain-References". The errors in the cross-references that Kirkbide have been published in all their editions of the Thompson's Bibles have been corrected. Copyright expired.

; Copyright info about the module. When need to insert paragraph, use |C tag. Max. 4095 characters.
D4_URL=

; URL where user can get info about module or next versions. Max. 255 characters.

 

D4_BooksNumber=66
D4_BooksExternNumber=0
; number of the books and external books in module. For complete Bible it is 66. Use only, if lex module contains some references. If this section is non zero, then also sections D4_Books= and

D4_BooksExtern= must by completed! See to more in preparation of book section.

 

;Type of key or headers:0=Latin,1=HE,2=GR texts,
;10=Strong HE+GR, 11=HE Strong, 12=GR Strong,
;20=Gematria HE+GR, 21=gematria HE, 22=gematria GR
;30=references (for headers only)
; following numerical definitions (here as note!) will be used for key and also for types of headers. 0-2 for text strings, 10-12 for strong numbers, 20-22 for gematrical values and 30 for reference, e.g. |RROTGen:1:1|Rr is reference to Gen 1:1 which can be used as key or type of header.

D4_KeyType=0

; here key type 0 according definitions above means Latin text key

;specification of main language and sublanguage. We use standard Windows
;values expressed by hexadecimal number. This affects sorting of keys in
;module. For English use 0x09 and 0x00, for Hebrew: 0x0d and 0x00 and
;for Greek 0x08 and 0x00. List of all possible values can be found in
;README.TXT for d4lex program and also in MSDN for MAKELANGID macro (also available freely online on Microsoft web)
D4_KeyPrimaryLanguage=0x09
D4_KeySubLanguage=0x00
; for sorting of texts, program needs to know MAIN language of the book. Here are standard Microsoft values for languages in hexadecimal form. You will find complete list in D4-specification.txt file in MDK in section Identifier Predefined symbol Language. Some most common values are listed in note. If language of the book has no sublanguage, then use on second line: D4_BookSubLanguage=0x00

 

D4_Headers=1

; number of the headers (headings). It is a good practice to have at least ONE header which is copy of key - to see this key not only in left part list of lexicon keys, but also in main lex window. TCT has thus one header.

;here can be used 0-9 headers. Not used can be omitted
D4_HeaderType0=0

; header type 0 according definitions above means Latin text header

D4_HeaderLabel0=Word:
; Latin text for label of first header (counted from 0!) - we use label "Word:" NOTE: you can insert some spaces to improve readability, e.g. "Word: " etc.

;1.st param: HEADER IS VISIBLE (1=yes, 0=no),
;2.nd param: INSERT NEW LINE AFTER HEADER (1=yes, 0=no)
;3.rd param: USE THIS HEADER FOR SEARCHING (e.g. Strong# of word) (1=yes, 0=no)
D4_HeaderParam0=1,1,1
; three numeric parameters, explained above.

;HEADER IS VISIBLE: default is 1 (yes) but you can create invisible header and use this header for searching (see below)

;INSERT NEW LINE AFTER HEADER: if put 1 (yes), next header will be put on new line. More readable, but cost is more space for headers.

;USE THIS HEADER FOR SEARCHING: if put 1 (yes), when Davar search, this header will be included. Important especially for headers with Strong#

 

D4_Tags=1

;Tag flags: 0=tag not used,1=tag is used and default visible,3=tag is used and default invisible |
D4_Tag_Preface=0
D4_Tag_Christ=0
D4_Tag_Notes=0
D4_Tag_Variant=0
D4_Tag_Unused=0
D4_Tag_Reference=1
D4_Tag_StrongsHE=0
D4_Tag_StrongsGR=0
D4_Tag_Bold=1
D4_Tag_Italic=0
D4_Tag_MorphologyHE=0
D4_Tag_MorphologyGR=0
D4_TypeOfGRMorphology=0
D4_Tag_Qere=0
D4_Tag_Ketiv=0
D4_Tag_PDF=0
D4_Tag_URL=0

; list of all tags, used in Davar4. Use only values 0 or 1 (rest is not implemented yet). 1= tag is used, 0= tag is not used.

; NOTE: TCT lexicon use two tags, bold text and reference => thus D4_BooksNumber is used and section D4_Books= is completed for all 66 books of Bible, which is used in TCT references.

 

D4_JumpInside=1

; if book contains references, setting to 1 means, that double click to this reference will jump in this module to position according reference. Setting to 0 means that ALL OTHER modules will be synchronized (if allowed), but position in this module will be unchanged.

 

D4_Books=
1,OTGen,Genesis,Gen
2,OTExod,Exodus,Exo
3,OTLev,Leviticus,Lev
4,OTNum,Numbers,Num
5,OTDeut,Deuteronomy,Deu
6,OTJosh,Joshua,Jos
7,OTJudg,Judges,Jdg
8,OTRuth,Ruth,Rth
9,OT1Sam,1 Samuel,1Sa
10,OT2Sam,2 Samuel,2Sa
11,OT1Kgs,1 Kings,1Ki
12,OT2Kgs,2 Kings,2Ki
13,OT1Chr,1 Chronicles,1Ch
14,OT2Chr,2 Chronicles,2Ch
15,OTEzra,Ezra,Ezr
16,OTNeh,Nehemiah,Neh
17,OTEsth,Esther,Est
18,OTJob,Job,Job
19,OTPss,Psalms,Psa
20,OTProv,Proverbs,Pro
21,OTQoh,Ecclesiastes,Ecc
22,OTCant,Song of Songs,Son
23,OTIsa,Isaiah,Isa
24,OTJer,Jeremiah,Jer
25,OTLam,Lamentations,Lam
26,OTEzek,Ezekiel,Eze
27,OTDan,Daniel,Dan
28,OTHos,Hosea,Hos
29,OTJoel,Joel,Joe
30,OTAmos,Amos,Amo
31,OTObad,Obadiah,Oba
32,OTJonah,Jonah,Jon
33,OTMic,Micah,Mic
34,OTNahum,Nahum,Nah
35,OTHab,Habakkuk,Hab
36,OTZeph,Zephaniah,Zep
37,OTHag,Haggai,Hag
38,OTZech,Zechariah,Zec
39,OTMal,Malachi,Mal
40,NTMatt,Matthew,Mat
41,NTMark,Mark,Mar
42,NTLuke,Luke,Luk
43,NTJohn,John,Joh
44,NTActs,Acts,Act
45,NTRoma,Romans,Rom
46,NT1Cor,1 Corinthians,1Co
47,NT2Cor,2 Corinthians,2Co
48,NTGalat,Galatians,Gal
49,NTEphes,Ephesians,Eph
50,NTPhili,Philippians,Phi
51,NTColos,Colossians,Col
52,NT1Thes,1 Thessalonians,1Th
53,NT2Thes,2 Thessalonians,2Th
54,NT1Tim,1 Timothy,1Ti
55,NT2Tim,2 Timothy,2Ti
56,NTTitus,Titus,Tit
57,NTPhile,Philemon,Phm
58,NTHebre,Hebrews,Heb
59,NTJames,James,Jam
60,NT1Pet,1 Peter,1Pe
61,NT2Pet,2 Peter,2Pe
62,NT1John,1 John,1Jo
63,NT2John,2 John,2Jo
64,NT3John,3 John,3Jo
65,NTJude,Jude,Jud
66,NTRevel,Revelation,Rev

; This block contains information about all books, used in module, in case of lex those books are used as references. First line:

;D4_Books=

;is immediately followed by descriptions for each book per line. Number of the lines MUST BE EXACTLY SAME AS THE NUMBER OF THE BOOKS specified before (section D4_Books=).

;Each book on line has following parameters (e.g. 1,OTGen,Genesis,Gen):

;1 =number of the book. From 1 to D4_Books

;OTGen = unique synchronization string for this book (Genesis). You will find complete list in D4-specification.txt file in MDK in section Reserved synchro names.

;Genesis = name of the book, which will be included in module. It means, you can use in data.txt almost any names for books, but this name will be used.

;Gen = abbreviation of the book, which will be used in module.

 

 

 

 


 

 

data.txt file

 

In case of lexicon, data.txt file must meet the structure, which was defined in info.txt file. This allows to module creator to define quite flexible various types of lexicons.

Below is first record of TCT lexicon (remember, each single record is on single line, also block below is one line)

|SKAaron|Sk|SH0|TBAARON|Tb|Sh0 |Cson of Amram, the first high priest.|C |C(1) General References to-|C |RROTExod:4:14|Rr; |RROTExod:5:20|Rr; |RROTExod:6:20|Rr; |RROTExod:7:1|Rr,|RROTExod:7:7|Rr,|RROTExod:7:12|Rr; |RROTExod:12:1|Rr; |RROTExod:16:34|Rr; |RROTExod:17:12|Rr; |RROTExod:19:24|Rr |RROTExod:24:14|Rr; |RROTExod:28:12|Rr; |RROTExod:30:10|Rr; |RROTExod:32:2|Rr; |RROTLev:10:6|Rr; |RROTNum:12:1|Rr; |RROTNum:16:11|Rr |RROTNum:17:3|Rr; |RROTNum:20:25|Rr,|RROTNum:20:28|Rr |C(2) FACTS CONCERNING|C |CMade spokesman for Moses-|C |RROTExod:7:1|Rr |CWith Hur, supports Moses' hands during a battle-|C |RROTExod:17:12|Rr |CMade the High Priest-|C |RROTExod:28:1|Rr |CBroke the covenant and made the Golden Calf-|C |RROTExod:32:2|Rr-|RROTExod:32:4|Rr |CExcluded from the Promised Land-|C |RROTNum:20:12|Rr |CDied on Mount Hor-|C |RROTNum:20:28|Rr

 

 

|SKAaron|Sk - this is text keyword "Aaron" in keyword paired tag |SK|Sk

|SH0|TBAARON|Tb|Sh0 - this is first header. All inside first header tags |SH0|Sh0 is interpreted as tagged text to display. In this case, we used tags for bold |TB|Tb and put inside keyword: AARON. Remember, in info.txt file we defined one header and D4_HeaderLabel0=Word: - this label is used before keyword AARON.

|Cson of Amram, the first high priest.|C |C(1) General References to-|C |RROTExod:4:14|Rr; |RROTExod:5:20|Rr; |RROTExod:6:20|Rr; |RROTExod:7:1|Rr,|RROTExod:7:7|Rr,|RROTExod:7:12|Rr; |RROTExod:12:1|Rr; |RROTExod:16:34|Rr; |RROTExod:17:12|Rr; |RROTExod:19:24|Rr |RROTExod:24:14|Rr; |RROTExod:28:12|Rr; |RROTExod:30:10|Rr; |RROTExod:32:2|Rr; |RROTLev:10:6|Rr; |RROTNum:12:1|Rr; |RROTNum:16:11|Rr |RROTNum:17:3|Rr; |RROTNum:20:25|Rr,|RROTNum:20:28|Rr |C(2) FACTS CONCERNING|C |CMade spokesman for Moses-|C |RROTExod:7:1|Rr |CWith Hur, supports Moses' hands during a battle-|C |RROTExod:17:12|Rr |CMade the High Priest-|C |RROTExod:28:1|Rr |CBroke the covenant and made the Golden Calf-|C |RROTExod:32:2|Rr-|RROTExod:32:4|Rr |CExcluded from the Promised Land-|C |RROTNum:20:12|Rr |CDied on Mount Hor-|C |RROTNum:20:28|Rr

- this is description part for keyword Aaron. You can see use of tag |C for new line. NOTE: |C tag is 2 characters long for easy conversion of CR+LF (hexadecimal 0x0d + 0x0a) characters to |C without change length of text. You can also see many of references. For example, first reference: |RROTExod:4:14|Rr is from following parts:

|RR|Rr - tags for reference. Inside is text of reference.

OTExod - unique synchronization string for Exodus, as used in D4_Books part of info.txt and must be used exactly as defined in D4-specification.txt file in MDK.

: - colon is used as separator between synchronization string and chapter number

4 - number of chapter

: - colon is used as separator between chapter number and verse number

14 - number of verse

 

 


 

Second example: STRIPD_GR lexicon

 

IMPORTANT: files below (data.txt and info.txt) are not part of MDK. Because module STRIPD_GR is a part of Davar4 installation, you can open this lexicon and then perform export in format "Source for MDK" with checked option "Create also info.txt file". Export module as data.txt file to selected folder. See more in Export section.

 

Example of STRIPD_GR lexicon: Greek text as key and 6 headings with various tags, below is description text area

 

info.txt file

;All Davar4 MDK import files are UTF-8, Little Endian, without Byte Order Mark. New line is CR+LF pair
;This file was generated by Davar 4 -> export to MDK format
;You can use this file (info.txt) and exported module text (data.txt) to rebuild module file using MDK programs

D4_OutputFile=stripd_gr.lex

D4_Version_Major=1
D4_Version_Minor=0
D4_Abbreviation=STRIPD_GR
D4_Title=Greek Lexicon IPD
D4_Info=Internet Public Domain Greek Lexicon; this is keyed to the "Theological Dictionary of the New Testament". Also include Hebrew equivalents of Greek keywords.
D4_Copyright=Public Domain
D4_URL=http://www.davar3.net/
D4_BooksNumber=0
D4_BooksExternNumber=0

;note there are not books, because this module has no references

 

;Type of key or headers:0=Latin,1=HE,2=GR texts
;10=Strong HE+GR, 11=HE Strong, 12=GR Strong,
;20=Gematria HE+GR, 21=gematria HE, 22=gematria GR
;30=references
D4_KeyType=2

;key type is 2 = GREEK text, according notes above

;specification of main language and sublanguage. We use standard Windows
;values expressed by hexadecimal number. This affects sorting of keys in
;module. For English use 0x09 and 0x00, for Hebrew: 0x0d and 0x00 and
;for Greek 0x08 and 0x00. List of all possible values can be found in
;MDK tools and also in MSDN for MAKELANGID macro (also available freely online on Microsoft web)
D4_KeyPrimaryLanguage=0x08
D4_KeySubLanguage=0x00

;primary language is Greek 0x08

D4_Headers=6

;as can be seen on picture above, there are 6 headers

;here can be used 0-9 headers. Not used can be omitted
;1.st param: HEADER IS VISIBLE (1=yes, 0=no),
;2.nd param: INSERT NEW LINE AFTER HEADER (1=yes, 0=no)
;3.rd param: USE THIS HEADER FOR SEARCHING (e.g. Strong# of word) (1=yes, 0=no)

D4_HeaderType0=2
D4_HeaderLabel0=Word:
D4_HeaderParam0=1,1,1

;1. header(counted from 0) is Greek text (=2), label is "Word:", visible header, after header is new line and THIS HEADER IS USED FOR SEARCHING

D4_HeaderType1=0
D4_HeaderLabel1=Pronounc:
D4_HeaderParam1=1,1,0

;2. header is latin based text (=0), label is "Pronounc:", visible header, after header is new line and this header is not used for searching

D4_HeaderType2=12
D4_HeaderLabel2=Strong:
D4_HeaderParam2=1,1,1

;3. header is Greek Strong# (=12), label is "Strong:", visible header, after header is new line and THIS HEADER IS USED FOR SEARCHING (because it is GR lexicone)

D4_HeaderType3=0
D4_HeaderLabel3=Orig:
D4_HeaderParam3=1,1,0

;4. header is latin based text (=0), label is "Orig:", visible header, after header is new line and this header is not used for searching

D4_HeaderType4=0
D4_HeaderLabel4=Use:
D4_HeaderParam4=1,1,0

;5. header is latin based text (=0), label is "Use:", visible header, after header is new line and this header is not used for searching

D4_HeaderType5=11
D4_HeaderLabel5=HE Strong:
D4_HeaderParam5=1,1,0

;6. header is Hebrew Strong# (=11), label is "HE Strong:", visible header, after header is new line and this header is NOT used for searching (because it is GR lexicone)

;IMPORTANT NOTE: When header is used for searching, it means SEARCHING FOR SYNCHRONIZATION (e.g. after double click). In this case some headers are included and some are not. But for fulltext searching, complete text is searched, include all headers.

D4_Tags=1

;Tag flags: 0=tag not used,1=tag is used and default visible,3=tag is used and default invisible
D4_Tag_Preface=0
D4_Tag_Christ=0
D4_Tag_Notes=0
D4_Tag_Variant=0
D4_Tag_Unused=0
D4_Tag_Reference=0
D4_Tag_StrongsHE=1
D4_Tag_StrongsGR=1
D4_Tag_Bold=0
D4_Tag_Italic=0
D4_Tag_MorphologyHE=0
D4_Tag_MorphologyGR=0
;Type of GR morphology:0=none,1=Tauber,2=Robinson,3=Packard
D4_TypeOfGRMorphology=0
D4_Tag_Qere=0
D4_Tag_Ketiv=0
D4_Tag_PDF=0
D4_Tag_GematriaHE=0
D4_Tag_GematriaGR=0
D4_Tag_URL=0

D4_Synchronize=1
D4_JumpInside=1

 

 

data.txt file

(remember, each single record is on single line, also block below is one line)

|SKΑβελ|Sk|SH0|TGΑβελ|Tg|Sh0|SH1|TIab'-el|Ti|Sh1|SH2|RG6|Rg|Sh2|SH3of Hebrew origin |RH1893|Rh; Abel, the son of Adam:--Abel. |RH01893|Rh|Sh3|SH4 |TRTDNT-*,2|Tr Proper Name Masculine|Sh4|SH5|RH1892|Rh|Sh5|TL Abel = "vanity (that is: transitory)" |TL |TL 1) the second son of Adam, murdered by his brother Cain

 

 

|SKΑβελ|Sk - Greek keyword Abel inserted into |SK|Sk tags. No need to use |TG|Tg tags for Greek text, because D4_KeyType was set to 2 (Greek)

|SH0|TGΑβελ|Tg|Sh0 - 1. header, inside |SH0 and |Sh0 tags. Repeated Greek keyword Abel, but now |TG and |Tg tags for Greek text must be used

|SH1|TIab'-el|Ti|Sh1 - 2. header inside |SH1 and |Sh1 tags, pronounciation is italic text, thus |TI and |Ti tags used

|SH2|RG6|Rg|Sh2 - 3. header, Greek Strong# 6 inserted using tags: |RH6|Rh

|SH3of Hebrew origin |RH1893|Rh; Abel, the son of Adam:--Abel. |RH01893|Rh|Sh3 - 4. header, here used Hebrew Strong#, e.g. |RH1893|Rh

|SH4 |TRTDNT-*,2|Tr Proper Name Masculine|Sh4 - 5. header, paired tag for raised text (upper index) inside |TR and |Tr

|SH5|RH1892|Rh|Sh5 - 6. header, again Hebrew Strong#, |RH1892|Rh

|TL Abel = "vanity (that is: transitory)" |TL |TL 1) the second son of Adam, murdered by his brother Cain - here is explanation of keyword part. New line (breaking the lines) is here by tag |TL, but same can be done by |C tag